package cn.iocoder.yudao.module.call.enums;

import cn.hutool.core.util.ObjectUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum StatGroupEnum {
    YEAR("year", "年"),
    MONTH("month", "月"),
    DAY("day", "天"),
    HOUR("hour", "小时");

    private final String type;
    private final String name;

    public static boolean isMonth(String source) {
        return ObjectUtil.equals(source, MONTH.getType());
    }

    public static boolean isDay(String source) {
        return ObjectUtil.equals(source, DAY.getType());
    }

    public static boolean isHour(String source) {
        return ObjectUtil.equals(source, HOUR.getType());
    }

}
